-
Notifications
You must be signed in to change notification settings - Fork 8.2k
scripts: west_commands: Add 'new' command #99110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
280b643 to
4f1db4f
Compare
4f1db4f to
c5c3432
Compare
Add a new west command as helper for Zephyr projects, drivers and modules. The project creation is the default state, generating a minimal configuration for a Zephyr app. The module creation consists of a simple template to be completed by the user. Driver creation follows the `example_application` format, producing or appending the created driver into the `drivers` and `dts/bindings` directories. This west command aims to ease developers load when starting new projects, or porting existing code into drivers/modules that operate with west and Zephyr. Signed-off-by: Paulo Santos <[email protected]>
c5c3432 to
a062650
Compare
|
henrikbrixandersen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think adding something like this requires more discussion. For instance, the code is embedded in a Python script - and it doesn't even follow the established naming of structs and macros.
To be honest, I don't see much value in generating boilerplate code this simple.
Definitely! This is something I've been talking about with some other developers and they all agreed it would be nice to have a "quick starter" for smaller building blocks on Zephyr like drivers and modules, that's the main force that made me implement this
Well, I'm not really going for a stone written like code to be generated, instead it would be necessary to do your modifications to the generated templates, it is more of a sample than an actual thing that should be used as is, not sure if I'm being clear, but we could discuss this further! Maybe an RFC?
I guess we could also discuss that! I went deliberately to the as simple as possible way, since it should be more of a building block than a full feature maker, I'm afraid that over doing templates would sorta limit the user implementations or embed some personal code style into the templates and so on. |



Add a 'new' west command as helper for Zephyr projects, drivers and modules.
The project creation is the default state, generating a minimal configuration for a Zephyr app. The module creation consists of a simple template to be completed by the user. Driver creation follows the
example_applicationformat, producing or appending the created driver skeleton into thedriversanddts/bindingsdirectories.This west command aims to ease developers load when starting new projects, or porting existing code into drivers/modules that operate with west and Zephyr.